package org.smallmind.scribe.pen;

public class PersonalizedTemplate extends Template {

   private String loggerName;

   public PersonalizedTemplate (String loggerName) {

      super();

      this.loggerName = loggerName;
   }

   public PersonalizedTemplate (Level level, boolean autoFillLogicalContext, String loggerName)
      throws LoggerException {

      super(level, autoFillLogicalContext);

      this.loggerName = loggerName;
   }

   public PersonalizedTemplate (Filter[] filters, Appender[] appenders, Enhancer[] enhancers, Level level, boolean autoFillLogicalContext, String loggerName)
      throws LoggerException {

      super(filters, appenders, enhancers, level, autoFillLogicalContext);

      this.loggerName = loggerName;
   }

   public int matchLogger (String loggerName) {

      return this.loggerName.equals(loggerName) ? Integer.MAX_VALUE : NO_MATCH;
   }
}

